# -*- coding: utf-8 -*-
# @Author   : niejiali
# @Time     : 2019/1/21 14:51
# @File     : enum.py
# @Software : PyCharm
from enum import Enum


class ClientTypeEnum(Enum):
    USER_EMAIL = 100
    USER_MOBILE = 101

    # 微信小程序
    USER_MINA = 200

    # 微信公众号
    USER_WX = 201

print(ClientTypeEnum.USER_EMAIL)
print(ClientTypeEnum['USER_EMAIL'])

promise = {
    ClientTypeEnum.USER_EMAIL: "XX"
}
print(promise)

t = ClientTypeEnum(100)
print(t.USER_EMAIL.value)